﻿<Application 
    x:Class="Skyper.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:data="clr-namespace:Skyper.Data"
	xmlns:ctrl="clr-namespace:Skyper.Controls"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:model="clr-namespace:Skyper.Model"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
    <!--Application Resources-->
    <Application.Resources>
		<data:VisibilityConverter x:Key="visibilityConverter" />
		<data:UserStatusImageConverter x:Key="userStatusImageConverter" />	
        <data:AvatarConverter x:Key="avatarConverter" />
		<ResourceDictionary x:Key="themes" Source="Themes/generic.xaml" />
		<model:ContactModel x:Key="sampleContact" City="Kaunas" Country="Lithuania" Mood="Hello World" Username="testUsr" Fullname="John Smith" />
		<!-- 
		<Style TargetType="ctrl:ContactControl">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ctrl:ContactControl">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto" />
								<ColumnDefinition Width="*" />
							</Grid.ColumnDefinitions>
							<TextBlock Text="Hello World" />
							<Image Grid.Column="0" x:Name="avatarImage" Height="80" Width="80" Source="/Images/General/Contact_48x48.png" />
							<StackPanel Grid.Column="1">
								<StackPanel>
									<TextBlock Text="{TemplateBinding Title}"  Style="{StaticResource PhoneTextLargeStyle}" />
									<TextBlock Text="{Binding Email,BindsDirectlyToSource=True}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
								</StackPanel>
								<StackPanel Orientation="Horizontal">
									<TextBlock Text="Mobile:" Style="{StaticResource PhoneTextSmallStyle}"/>
									<TextBlock Text="{Binding Phone}" Style="{StaticResource PhoneTextSmallStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
								</StackPanel>
							</StackPanel>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		-->
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>